<template>
  <div>
    <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="KEY授权" name="keyAuthorization">
        <key-authorization ref="keyAuthorization"></key-authorization>
      </el-tab-pane>
      <el-tab-pane label="软授权" name="softAuthorization">
        <soft-authorization ref="softAuthorization"></soft-authorization>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import keyAuthorization from './keyAuthorization.vue'
import softAuthorization from './softAuthorization.vue'
export default {
  components:{keyAuthorization,softAuthorization},
  data(){
    return{
      activeName:'keyAuthorization'
    }
  },
  methods:{
    handleClick(v){
      console.log(v);
      if(v.paneName=='keyAuthorization'){
        this.$refs.keyAuthorization.search()
      }
      if(v.paneName=='softAuthorization'){
        this.$refs.softAuthorization.search()
      }
    }
  }
}
</script>

<style>
</style>